<html>
<head><meta charset="utf-8"><title>issue #79744 · t-compiler/wg-diagnostics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/index.html">t-compiler/wg-diagnostics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/issue.20.2379744.html">issue #79744</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="218968426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/issue%20%2379744/near/218968426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/issue.20.2379744.html#218968426">(Dec 06 2020 at 04:30)</a>:</h4>
<p>I've been thinking about this diagnostics enhancement issue: <a href="https://github.com/rust-lang/rust/issues/79744">#79744</a>. I think it would be extremely hard to implement for not much gain, so I'm tempted to close it. However, I'm posting here first in case you think it's less hard than it seems to me and/or it's worth it.</p>



<a name="218968427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/issue%20%2379744/near/218968427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/issue.20.2379744.html#218968427">(Dec 06 2020 at 04:30)</a>:</h4>
<p>By the way, is this the right spot to post about this sort of stuff?</p>



<a name="218968615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/issue%20%2379744/near/218968615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/issue.20.2379744.html#218968615">(Dec 06 2020 at 04:37)</a>:</h4>
<p>Well, maybe let's not close it, in case some brave soul attempts to implement it :)</p>



<a name="218968659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/issue%20%2379744/near/218968659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/issue.20.2379744.html#218968659">(Dec 06 2020 at 04:38)</a>:</h4>
<p>I guess maybe we could store something in the <code>Sess</code> that maps each AST node to its "inference source"</p>



<a name="218968671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/issue%20%2379744/near/218968671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/issue.20.2379744.html#218968671">(Dec 06 2020 at 04:38)</a>:</h4>
<p>Or maybe in the <code>TyCtxt</code>?</p>



<a name="218968683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/issue%20%2379744/near/218968683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/issue.20.2379744.html#218968683">(Dec 06 2020 at 04:39)</a>:</h4>
<p>And then <code>InferenceSource</code> could be a struct with the span and in the future other stuff:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">InferenceSource</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="n">source_span</span>: <span class="nc">Span</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="219050540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/issue%20%2379744/near/219050540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/issue.20.2379744.html#219050540">(Dec 07 2020 at 08:06)</a>:</h4>
<p>I think we could definitely improve our diagnostics around inference, but I agree this is hard. We should find a general solution for errors that happen around inferred things. This seems like something that would be a major project around diagnostics, which I don't think anyone has the capacity for right now, but it may be something for mid next year</p>



<a name="219125230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/issue%20%2379744/near/219125230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/issue.20.2379744.html#219125230">(Dec 07 2020 at 19:19)</a>:</h4>
<p>Should I add some kind of label so that when people have more bandwidth we can find it?</p>



<a name="219125284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/issue%20%2379744/near/219125284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/issue.20.2379744.html#219125284">(Dec 07 2020 at 19:19)</a>:</h4>
<p>Like <code>E-longterm</code> or something like that?</p>



<a name="219188155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/issue%20%2379744/near/219188155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/issue.20.2379744.html#219188155">(Dec 08 2020 at 09:47)</a>:</h4>
<p>I think <code>E-hard</code> already carries that meaning? <span aria-label="grinning" class="emoji emoji-1f600" role="img" title="grinning">:grinning:</span></p>



<a name="219260849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/issue%20%2379744/near/219260849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/issue.20.2379744.html#219260849">(Dec 08 2020 at 20:51)</a>:</h4>
<p>I guess :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>